//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.customization.solead;

import com.engine.core.cfg.annotation.CommandDynamicProxy;
import com.engine.core.interceptor.AbstractCommandProxy;
import com.engine.core.interceptor.Command;
import com.engine.meeting.cmd.meetingbase.MeetingChangeCmd;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.Util;

import java.util.Map;
@CommandDynamicProxy(target = MeetingChangeCmd.class, desc="会议变更修改基本信息")
public class NewMeetingChangeCmd extends AbstractCommandProxy<Map<String, Object>> {


    @Override
    public Map<String, Object> execute(Command<Map<String, Object>> targetCommand) {
        BaseBean baseBean = new BaseBean();
        //获取到被代理对象
        MeetingChangeCmd meetingChangeCmd = (MeetingChangeCmd) targetCommand;
        //获取被代理对象的参数
        Map<String, Object> params = meetingChangeCmd.getParams();
        baseBean.writeLog( ">>>>>NewMeetingChangeCmd>>>>>",params );
        //参数回写
        meetingChangeCmd.setParams(params);
        Map<String, Object> result = nextExecute(targetCommand);
        String meetingid = Util.null2String(params.get("meetingid"));
        String meetingtype = Util.null2String(params.get("meetingtype"));
        String name = Util.null2String(params.get("name"));
        String caller = Util.null2String(params.get("caller"));
        String contacter = Util.null2String(params.get("contacter"));
        String desc_n = Util.null2String(params.get("desc_n"));
        if(!"".equals( meetingid )){
          RecordSet rs = new RecordSet();
          Object[] param = new Object[]{meetingtype,name,caller,contacter,desc_n,meetingid};
          rs.executeUpdate("update meeting set meetingtype=?,name=?,caller=?,contacter=?,desc_n=? where id=?",param);
        }

        return result;
    }
}
